1. Field of the Invention
This invention relates generally to computer operating systems and more particularly to storing and retrieving filenames in computer memory.
2. Description of the Background Art
The storing and retrieving of filenames in computer memory is extremely important to all computer users. When a computer user saves a file and filename into computer memory, it is important that the filename remain uniquely identifiable regardless of any other filenames or text encodings saved in the memory. If a filename is not uniquely identifiable, then a computer may be unable to retrieve the named file. Further, if the memory containing the filename is moved to a different computer then that filename must remain identifiable if the named file is to be retrievable.
Conventionally, a filename identity is represented by a string of bytes (“encoding”) stored in computer memory. A conventional Roman character based computer system will interpret the encoding to represent Roman characters in the American Standard Code for Information Interchange (ASCII) character set, even if the encoding actually represents Japanese characters. For example, a Japanese computer user may save a file with a Japanese filename onto a removable memory device, such as a floppy disk. The Japanese filename encoding is interpreted by a conventional Japanese character based computer system to be Japanese characters. However, if the Japanese user then inserts the removable memory device into a conventional Roman character based computer system, the Roman computer system will assume the Japanese encoding actually represents a Roman character filename rather than a Japanese character filename.
A problem with the conventional Roman character based computer system is that because it assumes that a filename is in Roman characters, it may equate two non-Roman character filenames as being identical. This is because a Roman computer system treats uppercase and lowercase letters in a filename as equivalent. Therefore, a Roman computer system would assume that the filenames “Example.txt” and “example.txt” (and their associated files) are the same even though they are represented by different strings of bytes, possibly leading to the assumption that two non-Roman filenames, which vary only by case, are identical. If a Roman computer system misinterprets a non-Roman filename, the system may mistakenly open the wrong file or may refuse to create a new file since it believes that that filename is already in use.
FIG. 1 is a diagram of Japanese characters in which characters within any given column appear identical to a conventional Roman character based computer system. For example, characters 104, 106, 108 and 110 in column 102 appear identical to a prior art Roman computer system because it treats all filenames as if they were written in the Roman alphabet. Therefore, if two Japanese filenames differed by just one character, such as characters 104 and 106, a prior art Roman computer system would actually consider them to be identical. Similar problems occur with other text encodings but the problem is most acute in Japanese and Chinese text encodings since in these languages each character is a word and therefore filenames are shorter and more likely to vary by just one character.
A Roman character based prior art system can only store filenames in Roman text encodings as partially represented by ASCII text encoding table 200 of FIG. 2. Each Roman character has its own encoding. For instance, character 202, the letter “A”, is stored as 7-bit encoding 204. However, because ASCII only allows 7 bit encodings, which means that ASCII can encode only 128 characters, basic ASCII encoding table 200 contains no encodings for Japanese or any other language that uses non-Roman characters. Japanese and other east-asian languages can easily have several thousand characters that need to be encoded. Therefore, a prior art Roman character based computer system cannot always accurately store or retrieve some east-asian filenames or other non-Roman filenames.
Therefore, an improved system and method are needed to store and retrieve filenames and files in a computer system.